ATTACK OF THE MUTANT HORDE
by Fin Fahey
from Computer Choice, December 1983

JERRY had discovered the Kao-An's deadly cargo three days ago. As a
biochemist attached to the Trinidadian government, he was on a mission to
study the after-effects of Agent Green on the dying jungles of Venezuela 
the nation that had been all but wiped out in the Oil Skirmish of '93. He had
decided to calibrate his equipment and had chanced to open the wrong crate.
Precision-guided munitions ... ground-to-air, ground-to-ground, the lot -
some of the weapons nuclear-tipped, all of them deadly. Which of the several
belligerent governments in the Caribbean had ordered the stuff, Jerry could
only guess at from the nationalities of the Kao-An's crew.

It soon became clear that they sensed that he knew something. Collier, the
cocky little Australian first mate, had stopped cracking jokes in his
presence. The grossly fat Captain Beesley, who appeared to live entirely on
chocolate bars, began to direct menacing glances at him, while the big
Afrikaaner, Winer, had taken to eyeing him speculatively while stroking the
butt of the old Mauser automatic he always carried, When Jerry's carefully
placed bugs revealed the extent of their plans for him he moved fast. He felt
no bitterness towards the crew  after all, few people in this last decade of
the millennium were not involved in the War, but he'd seen enough
eco-destruction not to wish any more on an already devastated continent.

After setting the shaped charges and collecting equipment and provisions,
he'd slipped overboard in a small dinghy, to make for one of the small
tropical islands visible on the horizon. The old tramp steamer had gone up
when he was little more than half way. From the violence of the detonations,
it seemed likely that the crew had never had a chance. Jerry shook his head
pityingly. He was thankful that none of the nukes had seen fit to go off.

He turned away and, bending his back to the oars, continued to appraise the
island looming up ahead. Like most of the once lush tropical land in the
region, it had suffered. Something had removed most of the tree cover, the
pathetic remnants of which stood out as tufts silhouetted against the sky.
Jerry patted the Geiger counter at his side with a worried look. The black
polymer radiation suit he wore was proof against most things, but not for
ever. He was hoping that his radio signals were picked up within the week 
and then  well, almost everyone needs biochemists, and that was only one of
his skills.

After what seemed an eternity of rowing he staggered ashore and dragged out
his detector kit. Neither the air nor earth in his immediate vicinity
contained any of the agents of death currently fashionable, so Jerry ripped
off his mask and collapsed gratefully onto the pebbly beach. The stress of
the last few days, coupled with his recent exertions, had told, for he slept
deeply and woke to find a swollen sun rising balefully through smoggy clouds.

There was no sign of the Kao-An  she'd evidently gone down during the night.
Jerry activated the automatic distress transmitter and began to evaluate
his surroundings. The tide lapping at his feet bore a chemical scum, the
detritus of industry and war. The air was acrid with a faint hint of decay.
No birds sang, no insects buzzed. Sniffing, he gazed inland. The scraggy
abused looking tree-line hardly seemed inviting; still, he would have to check
it out.

Jerry wandered through the scarred palm trees, warily checking his detectors,
nerves on edge. Huge areas of jungle had been replaced by patches of barren,
wind-stirred dust. Like a corpse, he thought, the bones protruding through
the decaying flesh. Here and there shrubby vegetation sought to regain a
foothold  in time, perhaps, the island would recover. If left alone, he
thought bitterly. The Geiger emitted an agonised squawk. Checking the
read-out, Jerry found the background radiation count increasing as he moved
inland. Abruptly the trees gave way to a sheet of lucent green glass,
shimmering in the morning sun. The soil itself had been fused by
thermonuclear heat. A test? he wondered ... or had there been fighting here,
and if so what over? Shrugging, he moved on, skirting the zone of worst
radiation.

He became aware of a distant throbbing  drum beat  heart beat? Remembering
old Caribbean voodoo tales, he told himself his imagination was playing
tricks. He shook his head and certainly the sinister pulsation seemed to have
stopped. No one after all could have survived in this place of death.
Breasting a shallow rise, he found himself on the edge of a plain packed with
many shallow depressions each about ten feet in diameter. About to return to
the beach he froze in his tracks  the throbbing bass note had returned. It
seemed to be emitted by the depressions. Investigating he found that each one
was inhabited, not by shadow but by a glistening, oily black mass, which
simmered and boiled with a furious activity. Every now and then the puddles
would pulsate in unison, producing the strange drum beat. Jerry squatted by a
particularly large hole towards the centre of the plain.

The air was steamy, chemical-laced. He took samples and checked the
temperature of the stuff  about blood heat. Oil probably, he thought,
released by the nearby nuclear detonation. Presumably some sort of low-level
volcanic heat had also been released, and this was stimulating thy activity.
But ... the crude oil shouldn't boil at blood temperature! As he contemplated
the enigmatic pool, he realised that its matt surface had altered  it was
now reflecting his features. He blinked, and in a shock of fear  it was no
reflection. A human face was emerging from the fluid!

Jerry drew back in horror as an entire human head appeared above the surface,
to fix him with an unblinking oily gaze. Panicking, he swivelled to run, only
to find that by many of the black pools stood human shapes. Or perhaps
humanoid  he hastily corrected himself. For examining the nearest of the
beings, Jerry realised that it was a caricature of his own form, right down
to the detector kit clutched in the right hand. Only  the equipment and the
hand formed a seamless whole. Mimesis! thought Jerry  he grasped at the
word, needing an explanation to bolster his sanity  the ability of some
living things to imitate their surroundings.

The massbeat intensified until Jerry felt his head would burst, and then, as
though activated by a common signal, the creatures began to shuffle towards
him, faces writhing in an obscene travesty of human expression. Zombies!
Jerry thought, remembering his voodoo  he half expected the monstrous Baron
Samedi, Lord of the Undead, to come leaping and cavorting across the
plain to reap his soul.

With a cry, Jerry unfroze. He ran, twisting and turning between the puddles
in a deadly game of tag. He was fast, but the zombies had numbers on their
side. Sweating and panting, he found himself hemmed in, a puddle behind,
three of the things approaching from different directions. It suddenly seemed,
however, that there were fewer zombies than before. As he watched, one of
them disappeared into a puddle. There was a series of sickening gurgling
sounds and the puddle boiled furiously, finally lying still as though
satiated.

Straight lines! he thought  they only travel in straight lines! Like
heat-seeking missiles, the mutants' only imperative was to home on Jerry,
their prototype. Jerry dodged around the nearest puddle and began to move
towards the edge of the desolate plain, keeping puddles between himself and
the zombies. He had one or two close shaves, but by the time he reached the
jungle edge all the things had disappeared. He stopped to catch his breath
and, seeing no further signs of life, trudged back to the beach.

He spent a fitful night there, his dreams haunted by monstrous mutant beings,
but the next day was picked up by a Panamanian hydrofoil. The crew laughed at
his story  they were a hard-headed lot, returning from a search and destroy
sweep against pirates, now enjoying a come-back in the Caribbean. They were
happy to put him ashore at Panama City  since the demise of the Northern
Hemisphere, technical expertise was in short supply. Only then did Jerry seek
to understand his experience in depth.

When analysed, the samples he had taken proved to be full of chemical
structures resembling RNA, the "memory molecule" of living cells. There were,
however, no cell membranes. Whatever was on the island resembled a giant
amoeba  one huge living cell, permeating the geological structure of the
whole island. What hellish interaction of hard radiation, war chemicals, and
Caribbean crude had spawned the monster, it was impossible to guess, but
there was no opportunity for further study.

By the time Jerry had convinced the Panamanians of the need for an
expedition, the island, and in fact the entire northern seaboard of South
America, had disappeared when the Indonesians demonstrated the Earthquake
Bomb, thereby ending The War. For a while Jerry was glum  he'd thought of a
thousand industrial uses for a mimetic life-form. Finally, calmed by the
tranquillity of post-war life, he found other matters to divert him.


----


GAME INSTRUCTIONS

TO PLAY Mutant Horde you must first enter a number to randomise the game,
always ensuring it's different. You can then start the game. Within the
square island, Mutants are shown as 'M', Puddles as 'O' and you, Jerry
Cornwall, as '*'. To move you must use the following keys:

	     E
	   W   R
	 S       D
	   Z   C
	     X

When you have moved, it is the Mutants turn. You may be killed by falling
into the ocean or puddle or encounter with a Mutant. You win when all the
Mutants have fallen, and you now may go onto another game. Good luck.


----


ATTACK OF THE MUTANT HORDE
Program Documentation

Line Numbers and Sub-Routines:
  95- 170   Randomise to make each game unique.
S/R 200     Generate a random number RN between limits R (maximum) and
            RM (minimum) inclusive.
S/R 300     Print a string M$ at the bottom of the screen.
S/R 340     Print a string M$ (usually one character) at co-ordinates PX,PY on
            the screen. (In Spectrum parlance, PX will be column number,
            PY line number.)
S/R 400     Scan keyboard to get string I$. (The routine is left only when
            something is found.)
 600        Start of a game.
 600- 730   Print scores; set up island border.
 750- 840   Plot puddles. Maximum and minimum number of puddles are set in
            line 750 to 30 and 15 respectively; you can change this to make the
            game easier if you wish.
 900- 985   Plot mutants and store the co-ordinates in arrays X() and Y().
            Maximum and minimum number of mutants are set in line 900 to 15
            and 5 respectively.
1020-1065   Set and plot player position.
1100        Start of game loop.
1100-1160   Analyse key input to give player's move.
1200-1260   Check if player's move is lethal.
1265        Plot player position on non-lethal move.
1300-1500   Loop to move all the mutants and check if: (i) they've fall in
            puddle; (ii) they've caught the player.
1510        Check if any mutants left (LM=0).
1550-1570   Print a "you win" message; increment player's score.
1800-1820   Print a "you're dead" message; increment mutant's score.
1900-1950   Check if another game wanted.
S/R 2000    Dimension arrays; declare constants; set up graphics strings.

Variables and Strings:
B$          One character "#" string to define island border.
A$          20 characters "#" string to define island border.
N           General purpose variable.
MS          Mutant score.
YS          Your score.
R           Random number upper limit.
RM          Random number lower limit.
RN          Random number returned by S/R 200.
I           Input variable (S/R 100).
I$          Input string   (S/R 400).
M$          Output string  (S/Rs 300 & 340).
PX,PY       (1) Screen co-ordinates for string M$.
            (2) Puddle X,Y co-ordinates.
NP          Total number of puddles.
NM          Total number of mutants.
LM          Number of mutants still "live".
YX,YY       Players X,Y co-ordinates.
S$          Character on screen at a given position (or on some machines
            S is ASCII number of character on screen at a given position).

Arrays:
X()         Mutants X co-ordinates (set to 99 when a mutant is "dead").
Y()         Mutants Y co-ordinates.

Readers may wish to alter the number of puddles or mutants to make the game
harder or easier. The number of puddles (NP) is changed by altering the
upper and lower limits R and RM in line 750, the number of mutants by
changing the same variables in line 900. (Be careful not to make RM greater
than R.)


-----


Oric

Mutant Horde can be converted easily to run on the Oric-1 micro. Simply
type in the listing as shown for the Spectrum and amend the lines shown
here. The Oric doesn't need the LET command, so you needn't keep typing
it in. Remember to put 23 spaces between the two sets of quotes in line
300. ZAP is used in line 310 because it is a more interesting sound,
and the WAIT in line 315 can be adjusted to suit your own requirements.

 200 RN=1+INT(RND(1)*R)
 300 PLOT 6,15,"(23 spaces)"
 305 PLOT 6,15,M$
 310 ZAP
 315 WAIT 100
 340 PLOT PX,PY,M$
 400 I$=KEY$
1055 S=SCRN(YX,YY): S$=CHR$(S): IF S$<>" " THEN GOTO 1020
1200 S-SCRN(YX,YY): S$=CHR$(S)
1390 S=SCRN(X(N),Y(N)): S$=CHR$(S)


-----


Dragon 32

To play the Mutant Horde game on the Dragon 32 micro, simply type in the
Spectrum listing given, and amend the lines shown here. Remember that it
is not necessary to keep typing in the BASIC command LET, as the Dragon
assumes that you mean this whenever it finds an equals sign.

In line 300 there are 23 spaces between the two sets of quotes. Line 2006
sets the address for the start of the screen memory. The best symbol to
use in line 2007 is the hash symbol, which is got by pressing Shift-3; it
doesn't appear here because line printers will not print it.

  90 CLS: CLEAR 1000
 200 RN=RND(R)
 300 PRINT @ 486,"(23 spaces)";
 305 PRINT @ 486,M$;
 310 PLAY "L10G"
 315 FOR W=1 TO 40: NEXT
 340 PRINT @ PX+PY*32,M$;
1055 S=PEEK(SS+YX+YY*32): S$=CHR$(S): IF S$<>" " THEN GOTO 1020
1065 M$="*": GOSUB 340
1200 S=PEEK (SS+YX+YY*32): S$=CHR$(S)
1210 IF S=96 THEN GOTO 1265
1390 S=PEEP(SS+X(N)+Y(N)32): S$=CHR$(S)
2006 LET SS=1024
2007 LET B$="S"


-----


Vic, Atari and other Micros

Mutant Horde will run on other micros, provided a number of changes are made.
The main things that will need adjustment are those parts of the program
which are machine dependent. For example, the noise that needs making
whenever something is printed, in line 310. You will have to look up this in
your manual.

The same applies to the random number routine that begins in line 190, though
there is not so much variation between different machines. The PRINT AT
command available on the Spectrum appears a number of times in the program.
Some machines have different ways of achieving this, others don't allow it at
all. On the Vic-20 you will have to perform programming gymnastics.

The PAUSE or WAIT routine can be replaced by a simple FOR ... NEXT loop in
line 315. You will have to adjust the length to suit your own tastes.

Maybe the most difficult part of the program to deal with is the bit where
the program reads the characters off the screen. The Spectrum uses SCREEN$,
and the Dragon uses a PEEK to that area of memory. Most other machines will
have to do something similar. Remember to set the beginning of screen memory
address correctly as in line 2006 of the Dragon version.

All that remains to be done then is to alter the keyboard scanning routine in
line 400, though it is quite likely that one or other of the alternatives
presented above will work on your micro.


-----


   1 REM Software City
         Random Tunes
    from Computer Choice, December 1983

This program will play a tune in the key of G. The notes which make up the
key are read in from the DATA statements in line 400 and stored in array a()
which is DIMensioned in line 200. Line 700 picks up one of these notes at
random and plays it for a random amount of time, which is defined in line 600.

[The key notes given were for F, not G, and they missed out one of the  ]
[values in the DATA statement as well (corrected in the TAP file).  JimG]


----------


   1 REM Software City
         The Entertainer
    from Computer Choice, December 1983

THIS program plays the old ragtime tune, "The Entertainer", by reading in the
notes from DATA statements. Line 500 is a special piece of code which will
recognise the end of the tune, which is flagged by the number 999 appearing
twice at the end of the DATA statements. 999 is chosen because there is no
note corresponding to the number.

Line 550 will recognise a note with value 100, this is interpreted as a rest
in the music, the length of the rest being determined by the time variable.
The note is then played, when required, in line 600.

This BASIC program can be used to play any music you wish; all you have to do
is enter the required DATA statements in lines 800 upwards.


----------


   1 REM Software City
         Noise
    from Computer Choice, December 1983

THIS short routine makes sound by changing the number held in the area of
memory which controls the Spectrums beeper. The same area of memory controls
the BORDER colour, which is why you see it change to black. If you choose a
different value for the variable a, the border will change to a different
colour.

The area of memory is called a Register. By sending it different patterns of
numbers in different sequences, it is possible to obtain a wide range of
sound effects. Computer Choice will pay 5 for every interesting sound, music
or graphics program we publish in the Software City pages. Let's see what you
can do with the OUT 254 command.


----------
